<?php
global $_GPC, $_W;
$GLOBALS['frames'] = $this->getMainMenu();
$item=pdo_get('zh_gjw_system',array('uniacid'=>$_W['uniacid']));
if(checksubmit('submit')){   
    $data['db']=$_GPC['db'];   
    $data['wp']=$_GPC['wp'];    
    $data['dt']=$_GPC['dt'];   
    $data['sc']=$_GPC['sc'];
    $data['dz']=$_GPC['dz'];
    $data['uniacid']=$_W['uniacid'];          
    if(empty($item)){                
        $res=pdo_insert('zh_gjw_system',$data);
        if($res){
            message('添加成功',$this->createWebUrl('menuset',array()),'success');
        }else{
            message('添加失败','','error');
        }
    }else{
        $res = pdo_update('zh_gjw_system', $data, array('id' => $_GPC['id']));
        if($res){
            message('编辑成功',$this->createWebUrl('menuset',array()),'success');
        }else{
            message('编辑失败','','error');
        }
    }
}
include $this->template('web/menuset');